<?php
	include_once '../includes/header.php';	
	include_once '../includes/menu.php';
?>
<div id="content">
<h2> Lista de Propriet&aacute;rios</h2>
<table id="example" class="display">
            <thead>
                <tr>
                	<th>Nome  </th>
                    <th>Endere&ccedil;o: </th>
                	<th>Email  </th>
                    <th>Opera&ccedil;&otilde;es</th>
                </tr>
            </thead>
            <tbody>
            <?php
           	 	require_once '../classes/banco.class.php';
           	 	
           	 	$banco = new banco();
				$banco->conecta();
				$resultado=$banco->listar("pessoa","where tipo_pessoa='proprietario'");
        		while($campo = mysql_fetch_array($resultado)){			
			?>
                    <tr>
                        <td>
                            <?php echo $campo['nome']; ?>
                        </td>
                        <td>
                            <?php echo $campo['endereco'];  ?>
                        </td>
                        <td>
                            <?php echo $campo['email']; ?>
                        </td>
                         <td align="center">
                            <a href="../telas/proprietarioConsultar.php?id=<?php echo $campo['id'];  ?>">
                                  <img src="../assets/icones/consultar.png" />
                            </a>
                        </td>
                    </tr>
                <?php }
                
	 		?>	           			
			</tbody>
	</table>
</div>
<?php 

	  include_once '../includes/footer.php';	

?>